package cn.yuanqiao.archive.storeRoom.mapper;

import cn.yuanqiao.archive.storeRoom.domain.Shelf;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 档案柜Mapper接口
 * 
 * @author xy
 * @date 2023-06-19
 */
@Mapper
public interface ShelfMapper 
{
    /**
     * 查询档案柜
     * 
     * @param shelfId 档案柜主键
     * @return 档案柜
     */
    public Shelf selectShelfByShelfId(@Param("shelfId") Long shelfId, @Param("code")String code);

    /**
     * 查询档案柜列表
     * 
     * @param shelf 档案柜
     * @return 档案柜集合
     */
    public List<Shelf> selectShelfList(@Param("shelf") Shelf shelf, @Param("code")String code);

    /**
     * 新增档案柜
     * 
     * @param shelf 档案柜
     * @return 结果
     */
    public int insertShelf(@Param("shelf") Shelf shelf, @Param("code")String code);

    /**
     * 修改档案柜
     * 
     * @param shelf 档案柜
     * @return 结果
     */
    public int updateShelf(@Param("shelf") Shelf shelf, @Param("code")String code);

    /**
     * 删除档案柜
     * 
     * @param shelfId 档案柜主键
     * @return 结果
     */
    public int deleteShelfByShelfId(@Param("shelfId")Long shelfId, @Param("code")String code);

    /**
     * 批量删除档案柜
     * 
     * @param shelfIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteShelfByShelfIds(@Param("shelfIds")Long[] shelfIds, @Param("code")String code);

    List<Map<String, Object>> getShelfs(@Param("storeId")Long shelfId, @Param("code")String code, @Param("region")String region);

    public int getCountByShelfCode(@Param("shelfCode") String shelfCode, @Param("code") String code, @Param("storeId") Long storeId);

    public int getCountByRegion(@Param("storeId") String par_id, @Param("region") String arr, @Param("code") String code);

    public Shelf getShelfById(@Param("shelfId") Long shelfId, @Param("code") String code);
}
